
// import request from '@/api/request.js'
import request from '@/utils/request.js'
export const login = (form) => {//用户登录
  return request.post('/api/users/login',form)//登录逻辑
};

//获取验证码
export const getCh = () => {//用户登录
  return request.post('/api/users/captcha')
};


export const suplogin = (form)=>{//管理员登录
  return request.post('/admin/login',form)//登录逻辑
 };
export const getVerifyCode = (data) => {
  return request.post('/captcha/generate', data, {
    headers: {
      "Content-Type": "application/json"
    },
    responseType: 'blob',
  });
};